<template>
  <!-- 系统超级管理员首页 -->
      <div id="ddd" style="margin-top:30px;width:99%; height: 70%">
          欢迎来到系统超级管理员页面！
         <img :src="tpsrc" style="margin-top:10px;height:500px;width:99%;float:left;margin-bottom:20px">
         <div style="margin-top:10px">
             <el-row>
                目前系统普通用户数量：<el-input v-model="pusers" style="width:16%;margin-right:25px" disabled></el-input>
                目前系统管理者数量：<el-input v-model="gusers" style="width:16%;margin-right:25px" disabled></el-input>
                目前系统政府超级管理员数量：<el-input v-model="zfusers" style="width:16%" disabled></el-input>
             </el-row>
             <el-row style="margin-top:30px">
                目前系统管理单位数量：<el-input v-model="managements" style="width:16%;margin-right:25px" disabled></el-input>
                目前系统场馆数量：<el-input v-model="venues" style="width:16%;margin-right:25px" disabled></el-input>
                <!-- 目前系统场地数量：<el-input v-model="venues" style="width:16%;margin-right:25px" disabled></el-input> -->
             </el-row>
         </div>
      </div>
</template>

<script>
// import * as echarts from 'echarts';
export default {
    

data () {
      return {
          tpsrc:'https://img0.baidu.com/it/u=530426417,2082848644&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500',
          pusers:'',
          puser:{},
          gusers:'',
          guser:{},
          zfusers:'',
          zfuser:{},
          managements:'',
          management:{},
          venues:'',
          venue:{}
          
      }
    },
    created() {
        this.gettb()
    },
    methods:{
        gettb() {
            this.getRequest('/users/?pagenum='+1+'&pagesize='+999999+'&query='+0).then(resp => {
                this.puser = resp.data.current_data
                this.pusers=this.puser.length
                // console.log(this.puser)
            })

            this.getRequest('/users/?pagenum='+1+'&pagesize='+999999+'&query='+1).then(resp => {
                this.guser = resp.data.current_data
                this.gusers=this.guser.length
                // console.log(this.puser)
            })

            this.getRequest('/users/?pagenum='+1+'&pagesize='+999999+'&query='+2).then(resp => {
                this.zfuser = resp.data.current_data
                this.zfusers=this.zfuser.length
                // console.log(this.puser)
            })

            this.getRequest('/management/managements/?pagenum='+1+'&pagesize='+999999+'&query='+'').then(resp => {
                this.management = resp.data.current_data
                this.managements=this.management.length
                // console.log(this.puser)
            })

            this.getRequest('/venue/venues/?pagenum='+1+'&pagesize='+999999+'&query='+'').then(resp => {
                this.venue = resp.data.current_data
                this.venues=this.venue.length
                // console.log(this.puser)
            })
        }
    }
}
</script>

<style lang="less" scoped>

</style>>